Test Series - Data Structure

Test Number 59/115

Q: Which of the following is not a random tree?
A. Treap
B. Random Binary Tree
C. Uniform Spanning Tree
D. AVL Tree
Solution: Treap, also known as random binary search tree, Random binary tree and Uniform spanning tree are all random tree. Random tree is a tree formed by a random process of addition and deletion of nodes. AVL tree is a self – balanced binary search tree.
Q: Which process forms the randomized binary search tree?
A. Stochastic Process
B. Branching Process
C. Diffusion Process
D. Aggregation Process
Solution: The randomized binary search tree is formed by the stochastic process. The stochastic process or also called random process is a mathematical tool or object including random variables.
Q: How many randomized binary search trees can be formed by the numbers (1, 3, 2)?
A. 2
B. 3
C. 6
D. 5
Solution: As there are 3 numbers (1, 3, 2) so total of 6 combinations can be formed using three numbers but Since (2, 1, 3) and (2, 3, 1) are same so in total there are 5 randomized binary search tree that can be formed.
Q: What is the expected depth of a node in a randomized binary search tree?
A. log n
B. n!
C. n2
D. 2 log n + O(1)
Solution: The expected value of depth of a node that is for a node a, the expected value of length of path from root to node a is found to be at most 2 log n + O(1).
Q: What is the longest length path for a node x in random binary search tree for the insertion process?
A. log x
B. x2
C. x!
D. 4.311 log x
Solution: Although it is difficult to find the length of the longest path in randomized binary search tree, but it has been found that the longest length is around 4.311 log x.
Q: What is the range of β in finding the length of the longest path in a randomized binary search tree?
A. (-1, 0)
B. (1, 0)
C. (0, 5)
D. (0, 1)
Solution: The longest path in a randomized binary search tree, but it has been found that the longest length is around 4.311 log x for node x. This is also equal to 1/β log x where β lies in the range (0, 1).
Q: What is the expected number of leaves in a randomized binary search tree?
A. n + 1
B. (n + 1)/3
C. (n + 1)/2
D. n + 3
Solution: In a random mathematical model, the expected value of number of leaves in a randomized binary search tree is found to be exactly (n + 1)/3 using probability.
Q: Is Treap a randomized tree.
A. True
B. False
C. ...
D. ...
Solution: Treap is a type of data structure which is a combination of binary tree and heap. It is an example of a randomized binary search tree. It stores value in pairs.
Q: What is the probability of selecting a tree uniformly at random?
A. Equal to Catalan Number
B. Less Than Catalan Number
C. Greater than Catalan Number
D. Reciprocal of Catalan Number
Solution: Catalan number is a sequence of natural number that is used in counting problem. Hence it is found that the selecting off a tree uniformly at random is reciprocal of Catalan number.
Q: Is mathematical randomized tree can be generated using beta distribution.
A. True
B. False
C. ...
D. ...
Solution: Beta distribution can be used using a different shape to generate a randomized binary search tree to create a special type of tree known as a botanical tree.

You Have Score    /10